package Data;

public abstract class Ingredient {

	private int _stock;
	
	public Ingredient(int stock) throws Exception {
		if(_stock <= 0)
			throw new Exception();
		_stock = stock;
	}

	public int getStock(){
		return _stock;
	}
	
	public boolean isEmptyStock(){
		return _stock == 0;
	}
	
	public void decrementStock() throws Exception{
		if(_stock <= 0)
			throw new Exception();
		--_stock;
	}
	
}
